<?php /* Smarty version 2.6.26, created on 2012-05-12 14:30:59
         compiled from controllers%5Csettings.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'replace', 'controllers\\settings.tpl', 23, false),)), $this); ?>
<!-- settings tpl -->

<form method="post" action="<?php echo $this->_tpl_vars['rlBase']; ?>
index.php?controller=<?php echo $this->_tpl_vars['cInfo']['Controller']; ?>
">
	<input name="group_id" value="<?php echo $_GET['group']; ?>
" type="hidden" />
	<table class="sTable" id="settings_anchor">
	<tr>
		<td style="width: 108px; border-right: 1px #667835 solid;" align="right" valign="top">
			<?php $_from = $this->_tpl_vars['configGroups']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['fGroups'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['fGroups']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['group']):
        $this->_foreach['fGroups']['iteration']++;
?>
				<?php if (empty ( $this->_tpl_vars['group']['Plugin_status'] ) || $this->_tpl_vars['group']['Plugin_status'] == 'active'): ?>
					<div id="ltab_<?php echo $this->_tpl_vars['group']['ID']; ?>
" title="<?php echo $this->_tpl_vars['group']['name']; ?>
" class="ltab <?php if (($this->_foreach['fGroups']['iteration'] <= 1)): ?>tabs_active<?php else: ?>tabs_inactive<?php endif; ?>" <?php if (($this->_foreach['fGroups']['iteration'] <= 1)): ?>style="margin: 0;"<?php endif; ?>><div><?php echo $this->_tpl_vars['group']['name']; ?>
</div></div>
					<?php if ($_GET['group'] == $this->_tpl_vars['group']['ID'] || ($this->_foreach['fGroups']['iteration'] <= 1)): ?>
						<script type="text/javascript">
						var sKey = '<?php echo $this->_tpl_vars['group']['ID']; ?>
';
						</script>
					<?php endif; ?>
				<?php endif; ?>
			<?php endforeach; endif; unset($_from); ?>
		</td>
		<td valign="top" style="width: 1px; border-right: 1px #667835 solid;"></td>
		<td valign="top">
			<?php $_from = $this->_tpl_vars['configGroups']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['fGroups'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['fGroups']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['group']):
        $this->_foreach['fGroups']['iteration']++;
?>				
				<div id="larea_<?php echo $this->_tpl_vars['group']['ID']; ?>
" class="larea hide">
					<div class="ltab_block_header clear"><div><?php echo ((is_array($_tmp=$this->_tpl_vars['lang']['configs_caption'])) ? $this->_run_mod_handler('replace', true, $_tmp, '[group]', $this->_tpl_vars['group']['name']) : smarty_modifier_replace($_tmp, '[group]', $this->_tpl_vars['group']['name'])); ?>
</div></div>
					<?php $this->assign('store', $this->_tpl_vars['group']['ID']); ?>
					<?php if (! empty ( $this->_tpl_vars['configs'][$this->_tpl_vars['store']] )): ?>
						<div style="padding: <?php if ($this->_tpl_vars['configs'][$this->_tpl_vars['store']]['0']['Type'] != 'divider'): ?>10px<?php else: ?>0<?php endif; ?> 10px 0;">
							<input type="hidden" name="a_config" value="update"/>
							<table class="form">
							<?php $_from = $this->_tpl_vars['configs'][$this->_tpl_vars['store']]; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['configF'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['configF']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['configItem']):
        $this->_foreach['configF']['iteration']++;
?>
							<tr class="<?php if ($this->_foreach['configF']['iteration']%2 != 0 && $this->_tpl_vars['configItem']['Type'] != 'divider'): ?>highlight<?php endif; ?>">
								<?php if ($this->_tpl_vars['configItem']['Type'] == 'divider'): ?>
									<td class="divider_line" colspan="2">
										<div class="inner"><?php echo $this->_tpl_vars['configItem']['name']; ?>
</div>
									</td>
								<?php else: ?>
									<td class="name" style="width: 210px;"><?php echo $this->_tpl_vars['configItem']['name']; ?>
</td>
									<td class="field">
										<div class="inner_margin">
											<?php if ($this->_tpl_vars['configItem']['Data_type'] == 'int'): ?><input class="text" type="hidden" name="config[<?php echo $this->_tpl_vars['configItem']['Key']; ?>
][d_type]" value="<?php echo $this->_tpl_vars['configItem']['Data_type']; ?>
" /><?php endif; ?>
											<input class="text" type="hidden" name="config[<?php echo $this->_tpl_vars['configItem']['Key']; ?>
][value]" value="<?php echo $this->_tpl_vars['configItem']['Default']; ?>
" />
											
											<?php if ($this->_tpl_vars['configItem']['Type'] == 'text'): ?>
												<input class="text <?php if ($this->_tpl_vars['configItem']['Data_type'] == 'int'): ?>numeric<?php endif; ?>" type="text" name="config[<?php echo $this->_tpl_vars['configItem']['Key']; ?>
][value]" value="<?php echo $this->_tpl_vars['configItem']['Default']; ?>
" />
											<?php elseif ($this->_tpl_vars['configItem']['Type'] == 'textarea'): ?>
												<textarea cols="5" rows="5" class="<?php if ($this->_tpl_vars['configItem']['Data_type'] == 'int'): ?>numeric<?php endif; ?>" name="config[<?php echo $this->_tpl_vars['configItem']['Key']; ?>
][value]"><?php echo ((is_array($_tmp=$this->_tpl_vars['configItem']['Default'])) ? $this->_run_mod_handler('replace', true, $_tmp, '\r\n', @PHP_EOL) : smarty_modifier_replace($_tmp, '\r\n', @PHP_EOL)); ?>
</textarea>
											<?php elseif ($this->_tpl_vars['configItem']['Type'] == 'bool'): ?>
												<input <?php if ($this->_tpl_vars['configItem']['Default'] == 1): ?>checked="checked"<?php endif; ?> type="radio" id="<?php echo $this->_tpl_vars['configItem']['Key']; ?>
_1" name="config[<?php echo $this->_tpl_vars['configItem']['Key']; ?>
][value]" value="1" /> 
												<label for="<?php echo $this->_tpl_vars['configItem']['Key']; ?>
_1"><?php echo $this->_tpl_vars['lang']['enabled']; ?>
</label>
												
												<input <?php if ($this->_tpl_vars['configItem']['Default'] == 0): ?>checked="checked"<?php endif; ?> type="radio" id="<?php echo $this->_tpl_vars['configItem']['Key']; ?>
_0" name="config[<?php echo $this->_tpl_vars['configItem']['Key']; ?>
][value]" value="0" /> 
												<label for="<?php echo $this->_tpl_vars['configItem']['Key']; ?>
_0"><?php echo $this->_tpl_vars['lang']['disabled']; ?>
</label>
											<?php elseif ($this->_tpl_vars['configItem']['Type'] == 'select'): ?>
												<select style="width: 204px;" name="config[<?php echo $this->_tpl_vars['configItem']['Key']; ?>
][value]" 
													<?php $_from = $this->_tpl_vars['configItem']['Values']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['sForeach'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['sForeach']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['sValue']):
        $this->_foreach['sForeach']['iteration']++;
?>
														<?php if (($this->_foreach['sForeach']['iteration'] <= 1)): ?>
															<?php if ($this->_foreach['sForeach']['total'] <= '1'): ?> class="disabled" disabled="disabled"<?php endif; ?>
														>
															<?php if (is_array ( $this->_tpl_vars['sValue'] )): ?><option value=""><?php echo $this->_tpl_vars['lang']['select']; ?>
</option><?php endif; ?>
														<?php endif; ?>
														<option value="<?php if (is_array ( $this->_tpl_vars['sValue'] )): ?><?php echo $this->_tpl_vars['sValue']['ID']; ?>
<?php else: ?><?php echo $this->_tpl_vars['sValue']; ?>
<?php endif; ?>" <?php if (is_array ( $this->_tpl_vars['sValue'] )): ?><?php if ($this->_tpl_vars['configItem']['Default'] == $this->_tpl_vars['sValue']['ID']): ?>selected="selected"<?php endif; ?><?php else: ?><?php if ($this->_tpl_vars['sValue'] == $this->_tpl_vars['configItem']['Default']): ?>selected="selected"<?php endif; ?><?php endif; ?>><?php if (is_array ( $this->_tpl_vars['sValue'] )): ?><?php echo $this->_tpl_vars['sValue']['name']; ?>
<?php else: ?><?php echo $this->_tpl_vars['sValue']; ?>
<?php endif; ?></option>
													<?php endforeach; endif; unset($_from); ?>
												</select>
											<?php elseif ($this->_tpl_vars['configItem']['Type'] == 'radio'): ?>
												<?php $this->assign('displayItem', $this->_tpl_vars['configItem']['Display']); ?>
												<?php $_from = $this->_tpl_vars['configItem']['Values']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['rForeach'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['rForeach']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['rKey'] => $this->_tpl_vars['rValue']):
        $this->_foreach['rForeach']['iteration']++;
?>
													<input id="radio_<?php echo $this->_tpl_vars['configItem']['Key']; ?>
_<?php echo $this->_tpl_vars['rKey']; ?>
" <?php if ($this->_tpl_vars['rValue'] == $this->_tpl_vars['configItem']['Default']): ?>checked="checked"<?php endif; ?> type="radio" value="<?php echo $this->_tpl_vars['rValue']; ?>
" name="config[<?php echo $this->_tpl_vars['configItem']['Key']; ?>
][value]" /><label for="radio_<?php echo $this->_tpl_vars['configItem']['Key']; ?>
_<?php echo $this->_tpl_vars['rKey']; ?>
">&nbsp;<?php echo $this->_tpl_vars['displayItem'][$this->_tpl_vars['rKey']]; ?>
&nbsp;&nbsp;</label>
												<?php endforeach; endif; unset($_from); ?>
											<?php else: ?>
												<?php echo $this->_tpl_vars['configItem']['Default']; ?>

											<?php endif; ?>
											<?php if ($this->_tpl_vars['configItem']['des'] != ''): ?>
												<span style="<?php if ($this->_tpl_vars['configItem']['Type'] == 'textarea'): ?>line-height: 10px;<?php elseif ($this->_tpl_vars['configItem']['Type'] == 'bool'): ?>line-height: 14px;margin: 0 10px;<?php endif; ?>" class="settings_desc"><?php echo $this->_tpl_vars['configItem']['des']; ?>
</span>
											<?php endif; ?>
										</div>
									</td>
								<?php endif; ?>
							</tr>
							<?php endforeach; endif; unset($_from); ?>
							<tr>
								<td></td>
								<td><input style="margin: 10px 0 0 0;" type="submit" class="button" value="<?php echo $this->_tpl_vars['lang']['save']; ?>
" /></td>
							</tr>
							</table>
						</div>
					<?php else: ?>
						<div style="margin: 10px 20px" class="static"><?php echo $this->_tpl_vars['lang']['confog_group_empty']; ?>
</div>
					<?php endif; ?>
				</div>
			<?php endforeach; endif; unset($_from); ?>
		</td>
	</tr>
	</table>
</form>

<script type="text/javascript">
<?php echo '

$(document).ready(function(){	
	$(\'#larea_\'+sKey).show();
	
	$(\'.ltab\').each(function(){
		if ( $(this).attr(\'class\').split(\' \')[1] == \'tabs_active\' )
		{
			$(this).removeClass(\'tabs_active\').addClass(\'tabs_inactive\');
		}
	});
	$(\'#ltab_\'+sKey).removeClass(\'tabs_inactive\').addClass(\'tabs_active\');
	
	$(\'.larea\').hide();
	
	$(\'#larea_\'+sKey).show();
	
	$(\'.ltab\').click(function(){
		
		var yScroll;
		if (self.pageYOffset)
			yScroll = self.pageYOffset;
		else if (document.documentElement && document.documentElement.scrollTop) 
			yScroll = document.documentElement.scrollTop;// Explorer 6 Strict
		else if (document.body)
			yScroll = document.body.scrollTop;// all other Explorers
			
		var pos = $(\'#settings_anchor\').position();
		
		$(\'html, body\').stop();

		if ( yScroll > pos.top )
		{
			$(\'html, body\').animate({scrollTop:pos.top-40}, \'slow\');
		}
	
		var cid = $(this).attr(\'id\').split(\'_\')[1];
		$(\'input[name=group_id]\').val(cid);

		$(\'.ltab\').each(function(){
			if ( $(this).attr(\'class\').split(\' \')[1] == \'tabs_active\' )
			{
				$(this).removeClass(\'tabs_active\').addClass(\'tabs_inactive\');
			}
		});
		$(\'#ltab_\'+cid).removeClass(\'tabs_inactive\').addClass(\'tabs_active\');
		
		$(\'.larea\').hide();
		$(\'#larea_\'+cid).show();
	});
});

'; ?>

</script>

<!-- settings tpl end -->